package com.leaves;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.core.env.Environment;

/**
 * SpringBoot方式启动类
 *
 * @author yubaoshan
 * @date 2017/5/21 12:06
 */
@SpringBootApplication
public class MediaManagerApplication {

    private static final Logger logger = LoggerFactory.getLogger(MediaManagerApplication.class);


    public static void main(String[] args) {

        SpringApplication springApplication = new SpringApplication(MediaManagerApplication.class);
        Environment environment = springApplication.run(args).getEnvironment();
        logger.info("-----------------------------------------");
        logger.info("-----------------------------------------");
        logger.info("----Application is Running Successfully----");
        logger.info("-----------------------------------------");
        logger.info("-----------------------------------------");
        logger.info("项目后端已启动，端口:{}", environment.getProperty("server.port"));
    }

}
